package config

import "time"

// MySQL基本配置项
const (
	MySQLHost     = "localhost"
	MySQLPort     = "3306"
	MySQLUser     = "root"
	MySQLPassword = "root"
	MySQLDatabase = "entry_task"
)

// MySQL连接池配置项  最大连接数、 最大空闲连接数、最大存活时间
const (
	MaxOpenConn     = 5
	MaxIdleConn     = 5
	MaxConnLifetime = time.Hour
)

// Redis的配置项
const (
	RedisAddress  = "localhost:6379"
	RedisPassword = ""
)

// Redis 连接池配置项
const (
	RedisPoolSize     = 10              // 连接池大小
	RedisMinIdleConn  = 5               // 最小空闲连接数
	RedisDialTimeout  = 5 * time.Second // 连接超时
	RedisReadTimeout  = 3 * time.Second // 读取超时
	RedisWriteTimeout = 3 * time.Second // 写入超时
)

// TokenExpireTime Token过期时间
const TokenExpireTime = 1 * time.Hour

const RedisUserTokenKey = "tcp_server:user:token_"

const RedisUserBaseMessageKey = "tcp_server:user:base_message_"
